package com.smedi.ismedi.inmail.api.feign;

import com.smedi.ismedi.inmail.api.dto.request.UserActionLogPageRequest;
import com.smedi.ismedi.inmail.api.dto.request.UserActionLogRequest;
import com.smedi.ismedi.inmail.api.dto.response.UserActionLogResponse;
import com.smedi.ismedi.web.starter.common.PaginationData;
import com.smedi.ismedi.web.starter.common.ResponseData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Validated
@RestController
@FeignClient("ismedi-inmail")
@Api(tags = "用户操作日志")
@RequestMapping("api/v1/action")
public interface RemoteUserActionFeignApi {

    /**
     * 人员操作记录查看
     * */
    @ApiOperation(httpMethod = "GET",value = "用户操作查看")
    @PostMapping("/user-action/page")
    ResponseData<PaginationData<UserActionLogResponse>> getUserActionLogPage(@Validated @RequestBody UserActionLogPageRequest userActionLogPageRequest);

    /**
     * 人员操作记录保存
     * */
    @ApiOperation(httpMethod = "POST",value = "用户操作记录存储")
    @PostMapping("/user-action/save")
    ResponseData<Boolean> saveUserActionLog(@RequestBody UserActionLogRequest request);

}
